|
|
|
|
|
|
|
Figure 12.17.
Creating a total value for orders for each customer. |
|
|
|
|
|
|
|
|
The last step is to set the FunctionType property for the function. The FunctionType property determines what operation will be performed on the data specified in the DataField. The default setting of the property is RptFuncSum, which sums the data. Other functions include Average, Minimum, and Maximum. To the Customer footer, add a function that sums the order totals, as shown in Figure 12.18, and then re-run the application to display the report with the order summary in it. |
|
|
|
|
|
|
|
|
Another feature that can be used in a Data Report is the capability of creating aggregate fieldsfields that summarize the data in a section. This may sound the same as the Function control because both are calculated as the report is generated. However, the Function control can be placed only in a Group Footer, while an Aggregate field can be placed anywhere in the Data Report. Another difference is how the two fields are created. Whereas the Function control is a feature of the Data Report itself, the Aggregate field is a feature of the Data Environment. This means that the Aggregate field can be used anywhere that the Data Environment can be used. To add an Aggregate field, you would create an Aggregate field in the Data Environment by using the Aggregate tab of the Data Environment Property dialog (see Figure 12.18). |
|
|
|
|
|